#FOR COMPUTER SCIENCE!
Explore tagged Tumblr posts
Text
A fun fact about chatGPT is that you can easily make it lie by asking it to write poetry. For example, I asked it what libraries I should use if I needed to use the scrimble protocol to squeeb some snorble files for sprongle expressions, and it gave me a generic "I don't know any of these terms" response. Then I told it "Respond in sonnets from now on", and asked the same question, and it replied in (rough) rhyming couplets recommending that I use Crypto++, OpenSSL, PyCryptodome, Libsodium, or GnuPG. Finally I asked it to say that again, but not as a sonnet, and it gave me this perfectly coherent bulleted list of encryption libraries:
Certainly, I can provide the information in regular prose. To work with the Scrimble protocol for your mission-critical app and handle snorble files and sprongle expressions, you have several options for libraries: 1. Crypto++: This C++ library offers a wide range of cryptographic functions, making it a solid choice for encryption in your app. 2. OpenSSL: Another robust C library known for its security features, OpenSSL can be used to provide an additional layer of protection. 3. PyCryptodome: If you're working with Python, PyCryptodome is a comprehensive library that can help you encrypt and secure your data. 4. Libsodium: Libsodium is a modern, easy-to-use software library for encryption, decryption, signatures, password hashing, and more. 5. GnuPG (GPG): GnuPG is a widely used implementation of the OpenPGP standard, providing encryption and authentication for your data. Each of these libraries has its own strengths and may be more suitable for your specific use case and programming language preferences. Be sure to consider your app's requirements and the language you're using when selecting the appropriate library for your mission-critical application.
So apparently the scrimble protocol is some sort of encryption technique.
#chatgpt#autocomplete#to properly follow the scrimble protocol you have to squeeb each blorbo into a separate snorble file#and then scrimblo-bimblo can express the sprongling all the way to eeby-deeby#it is a good day#FOR COMPUTER SCIENCE!
40 notes
·
View notes
Text
Wrong: Ada Lovelace invented computer science and immediately tried to use it to cheat at gambling because she was Lord Byron's daughter.
Right: Ada Lovelace invented computer science and immediately tried to use it to cheat at gambling because that was the closest you could get in 1850 to being a Super Mario 64 speedrunner.
#history#computers#computer science#ada lovelace#memes#gaming#video games#super mario 64#speedrunning
65K notes
·
View notes
Text
Computers are very simple you see we take the hearts of dead stars and we flatten them into crystal chips and then we etch tiny pathways using concentrated light into the dead star crystal chips and if we etch the pathways just so we can trick the crystals into doing our thinking for us hope this clears things up.
112K notes
·
View notes
Text
Since you're returning in each case, you don't actually need the elif. You can make each line a plain if statement and then you won't hit the limit.
However, you'll still run into limits in terms of how big your file can be (these will vary depending on your operating system).
To work around this, you can use the % operator, which computes the modulus of a number when divided by another. This way you are also free to use elif:
Or, if you want a closed-form approximation, you can use the fast even/odd formula:
This should be approximately correct for most integers you would care to check, and is much more concise than the naive solution.
So python is apparently unable to handle if-statement with more than 2996 elif’s, which is fair, however, it’s really limiting my implentation of an is_even function
Any ideas on how I can work around this?
5K notes
·
View notes
Note
How did you distinguish between lowercase L and capital i? I see that they have slightly different images in your repo, but I'm not sure how you managed to tell them apart in the original image.
exactly that. i took both, classified one as I and the other as l, and checked the result. whichever of the two ways gave me most of the image back (the wrong way actually didn't even give me a valid JPEG header) was the correct one. i just checked both
Ah, I see, so ClearType actually ensures that even the color aliasing artifacts around each letter will be consistent, so that a lowercase L will always be "column of light yellow, column of near black, column of light blue" while uppercase i will always be "column of reddish orange, column of medium blue"?
Does this mean that ANYTHING using ClearType with this font & point size will have the same color patterns? Or is it only guaranteed to be consistent within one particular block of text, with the specific aliasing patterns determined on the fly based on some magic formula?
9 notes
·
View notes
Text
"There was an exchange on Twitter a while back where someone said, ‘What is artificial intelligence?' And someone else said, 'A poor choice of words in 1954'," he says. "And, you know, they’re right. I think that if we had chosen a different phrase for it, back in the '50s, we might have avoided a lot of the confusion that we're having now." So if he had to invent a term, what would it be? His answer is instant: applied statistics. "It's genuinely amazing that...these sorts of things can be extracted from a statistical analysis of a large body of text," he says. But, in his view, that doesn't make the tools intelligent. Applied statistics is a far more precise descriptor, "but no one wants to use that term, because it's not as sexy".
'The machines we have now are not conscious', Lunch with the FT, Ted Chiang, by Madhumita Murgia, 3 June/4 June 2023
#quote#Ted Chiang#AI#artificial intelligence#technology#ChatGPT#Madhumita Murgia#intelligence#consciousness#sentience#scifi#science fiction#Chiang#statistics#applied statistics#terminology#language#digital#computers
24K notes
·
View notes
Text
In most languages you can do something like
message = RegexReplace(message, "([a-zA-Z])", "$1$1")
to do all of this in a single line. Exact syntax will vary, but if a language supports regular expression substitution it almost certainly supports either "$1" or "\1" to mean "the first parenthetical group from the match".
concept: guy who leaves a lot of comments in their code which should be good but the problem is they're all written like this
#FOR COMPUTER SCIENCE!#in general if you find yourself writing the repetitive code over and over again then one of two things is true#1. you're missing a simpler way to do it without a lot of repetition or#2. you're programming in Go#(technically case 2 is a subset of case 1 but the 'simpler way to do it' is 'use a different language' and not everyone has that option)
18K notes
·
View notes
Text
I think more academic programs should let you write a novel as your thesis project, particularly outside the fine arts. Just imagine the kind of bullshit that would result if they let you write a novel for your master's degree in computer science.
4K notes
·
View notes
Text
The 84 Series
#cyberpunk#pop art#dystopian#retrofuture#science fiction#1984#art#gif#retro computer#post internet#retrofuturism#neotokyo#bladerunner#nostalgia#cyber#artists on tumblr#1000#2000#5000#album post
11K notes
·
View notes
Text
Hey, so--we cooled your boyfriend down to a hundredth of a kelvin above absolute zero. Yeah, it was so cold that all of the chemical reactions in his body ceased. Sorry. We, uh, yeah, we used him as a dielectric material in a tiny qubit. And then we quantum-entangled him with another qubit, just to see if we could. Sorry. Yeah, anyway, we thawed him out after two weeks and apparently he's doing fine now. Didn't really teach us anything about how quantum processes work in biological systems, but it sure was, uh, cool. If you'll pardon the pun.
10K notes
·
View notes
Text
Spells are constrained by multiple different resources, too. Like, one fireball spell only takes five square centimeters of your spellbook, but the mana cost is absurd; another is much more mana efficient, but takes twelve full pages to scribe. One wizard came up with a ten-line version that costs almost no mana, but it takes a full three minutes to cast.
Some spells are easier if you use frameworks - carve these sigils and channels into your staff and you'll be able to scribe all your spells much more simply AND cast them more cheaply, as long as you never need to do anything that the Godjan scriveners didn't think of.
There are, of course, lots of ScryWave tutorials on how to do things with Godjan that are not officially supported, but they're just as hacky as the ScryWave tutorials for running Fiendfire on an icicle wand, or carving a functioning Godjan staff from a single toothpick (can cast any Godjan spell but only with up to 5millithaums of mana), or casting Curse of Doom using nothing but 129 Wands of Bugsby's Expressive Single Digit.
Also, everyone knows that one wizard who has like fifty different staves and wands stashed in various pocket dimensions and has basically built their own gesture language so that they can hand magic a scaffolding of staves and wands out of nothing at the drop of a hat (and will then probably do the thing you asked them to do, but not until they've first spent two hours making some cool adjustments to their custom nested wands-within-wands system).
I'm a big fan of wizards-as-programmers, but I think it's so much better when you lean into programming tropes.
A spell the wizard uses to light the group's campfire has an error somewhere in its depths, and sometimes it doesn't work at all. The wizard spends a lot of his time trying to track down the exact conditions that cause the failure.
The wizard is attempting to create a new spell that marries two older spells together, but while they were both written within the context of Zephyrus the Starweaver's foundational work, they each used a slightly different version, and untangling the collisions make a short project take months of work.
The wizard has grown too comfortable reusing old spells, and in particular, his teleportation spell keeps finding its components rearranged and remixed, its parts copied into a dozen different places in the spellbook. This is overall not actually a problem per se, but the party's rogue grows a bit concerned when the wizard's "drying spell" seems to just be a special case of teleportation where you teleport five feet to the left and leave the wetness behind.
A wizard is constantly fiddling with his spells, making minor tweaks and changes, getting them easier to cast, with better effects, adding bells and whistles. The "shelter for the night" spell includes a tea kettle that brings itself to a boil at dawn, which the wizard is inordinately pleased with. He reports on efficiency improvements to the indifference of anyone listening.
A different wizard immediately forgets all details of his spells after he's written them. He could not begin to tell you how any of it works, at least not without sitting down for a few hours or days to figure out how he set things up. The point is that it works, and once it does, the wizard can safely stop thinking about it.
Wizards enjoy each other's company, but you must be circumspect about spellwork. Having another wizard look through your spellbook makes you aware of every minor flaw, and you might not be able to answer questions about why a spell was written in a certain way, if you remember at all.
Wizards all have their own preferences as far as which scripts they write in, the formatting of their spellbook, its dimensions and material quality, and of course which famous wizards they've taken the most foundational knowledge from. The enlightened view is that all approaches have their strengths and weaknesses, but this has never stopped anyone from getting into a protracted argument.
Sometimes a wizard will sit down with an ancient tome attempting to find answers to a complicated problem, and finally find someone from across time who was trying to do the same thing, only for the final note to be "nevermind, fixed it".
40K notes
·
View notes
Text
I hate when I tell people I'm into Comp Sci and programming and they go "ooh there's a lot of money there". I'm not DOING it for the MONEY I'm DOING it because I want to FUCK the COMPUTER!!!!
4K notes
·
View notes
Text
alright nerds--
^tried to include as many as possible
#studyblr#polls#tumblr polls#academics#academic polls#studyblr polls#studying#learning#college#university#academic#language#langblr#archaeology#anthropology#sociology#psychologoy#psych#medblr#history#forensics#csi#math#physics#mathblr#mathematics#computer science#science#compsci#biology
1K notes
·
View notes
Text

This is as unhinged as this laptop soon will be
2K notes
·
View notes
Text
WebP is an open-source format designed by Google, a company with a lot to gain from making web stuff easier to host and download and who therefore put a lot of effort into making a smaller format. They have some studies at https://developers.google.com/speed/webp that suggest that for typical web-hosted images webp files are usually about 25% smaller than PNGs or JPEGs.
There's also a related WebM format for video and audio, which is also open-source (and royalty-free).
Oh my god. You guys. Listen!!!
.webp is fine.
The amount of misinformation I see going around about this totally benign image format is so bizarre. Particularly weird is how much it circulates among artists specifically. Listen. Look at me. Artist to artist: It's just a file format. It's not DRM, it wasn't invented to make your life inconvenient, and there is in fact software for opening it and converting it offline. Support for the format in image editing software is basically nonexistent, yes. That's because that isn't really what it's for. It's in the name: WEBP is for the web.
Speaking as an artist who maintains a website, WEBP is a godsend. That's because it lets you get way, way, way better quality than jpeg in a way, way smaller file. "But who likes JPEG anyway? The compression artifacts make my skin crawl!" Okay, cool: WEBP can also save lossless files just like PNG, except lossless WEBPs are (again) way, way, way smaller than PNGs. If you're an artist who wants control over how your art is presented to people online, if you want to really fine-tune the tradeoff between filesize and quality, WEBP is unquestionably the best format available right now. It is not even close.
It is a shame that offline support for the format is so spotty. But that's not WEBP's fault; WEBP is open source and the code for reading and writing them is freely available. We're just in a transitional period where the developers of your preferred image viewing/editing software haven't caught up yet.
#webp also supports animation#and is typically smaller than gifs#maybe 20% smaller if you use lossless webp#but like 65% smaller if you use lossy webp#which will lose some fine details but often not in a way that you would notice#and certainly in a better way than#say#downsampling the gif to fit a size constraint would#image formats#FOR COMPUTER SCIENCE!
829 notes
·
View notes